﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
	String path = request.getContextPath();
	String basePath = "/";
%>
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>分润活动统计</title>
  <style>
    .activity-overall {}

    .activity-list {
      list-style: none;
      width: 100%;
      padding: 0;
    }

    .activity-list:after {
      content: '';
      display: block;
      clear: both;
    }

    .activity-li {
      float: left;
      width: 31%;
      height: 140px;
      text-align: center;
      border: 1px solid #000;
      margin-right: 20px;
      margin-bottom: 10px;
    }

    .activity-li p {
      margin-top: 20px;
      margin-bottom: 20px;
    }


    .number {
      color: red;
      font-size: 20px;
    }
     .pareny a.active{
    background: #00FF00!important;
    border-color:#00FF00!important;
    }
  </style>
  <base href="/">
<!-- 下拉框 -->
<link rel="stylesheet" href="static/ace/css/chosen.css" />
<!-- jsp文件头和头部 -->
<%@ include file="../../system/index/top.jsp"%>
<!-- 日期框 -->
<link rel="stylesheet" href="static/ace/css/datepicker.css" />
</head>

<body>
<form action="goldBowl/profitDetails" method="post"
	name="userForm" id="userForm">
	<input type="hidden" name="times" id="times">
	<input type="hidden" id="startTime" value="${pd.startTime }">
	<input type="hidden" id="endTime" value="${pd.endTime }">
	<table class="table" style="margin-top: 5px;width:1000px;">
	<tr>
		<td class="pareny">
		<a class="btn btn-xs" 
			onclick="times(1);">
			今天
		</a>&nbsp;&nbsp;
		<a class="btn btn-xs" 
			onclick="times(2);">
			昨天
		</a>&nbsp;&nbsp;
		<a class="btn btn-xs" 
			onclick="times(3);">
			前天
		</a>&nbsp;&nbsp;
		<a class="btn btn-xs" 
			onclick="times(4);">
			近7天
		</a>&nbsp;&nbsp;
		<a class="btn btn-xs" 
			onclick="times(5);">
			近30天
		</a>&nbsp;&nbsp;&nbsp;自定义时间:&nbsp;
		<input class="span10 date-picker" name="startTime"
          value="${pd.startTime }"
          type="text" data-date-format="yyyy-mm-dd"
          style="width:88px;" placeholder="开始时间"
          title="开始时间"/>-
        <input class="span10 date-picker" name="endTime"
            type="text" value="${pd.endTime }"
          data-date-format="yyyy-mm-dd"
          style="width:88px;" placeholder="结束时间"
          title="结束时间"/>&nbsp;&nbsp;&nbsp;
          <a class="btn btn-light btn-xs" onclick="searchs();" title="检索"><i
			id="nav-search-icon"
			class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a>
		</td>
	</tr>
</table>

  <div class="activity-overall">
    <ul class="activity-list">
      <li class="activity-li">
        <p>被邀请注册用户</p>
        <p class="number">${info.userNum}&nbsp;人</p>
        <a href="javascript:void()" onclick="member()">查看详情</a>
      </li>
      <li class="activity-li">
        <p>其中消费人数</p>
        <p class="number">
         <c:if test="${info.consumeNum ==null || info.consumeNum ==''}">0 &nbsp;人</c:if>
         <c:if test="${info.consumeNum !=null && info.consumeNum !=''}">${info.consumeNum} &nbsp;人</c:if>
        </p>
        <a href="javascript:void()" onclick="member1()">查看详情</a>
      </li>
      <li class="activity-li">
        <p>消费总金额</p>
        <p class="number">
        <c:if test="${info.price ==null || info.price ==''}">0 &nbsp;元</c:if>
         <c:if test="${info.price !=null && info.price !=''}">${info.price} &nbsp;元</c:if>
        </p>
        <a href="javascript:void()" onclick="member()">查看详情</a>
      </li>
    </ul>
  </div>
  </form>
  <!-- 页面底部js¨ -->
	<%@ include file="../../system/index/foot.jsp"%>
	<!-- 删除时确认窗口 -->
	<script src="static/ace/js/bootbox.js"></script>
	<!-- ace scripts -->
	<script src="static/ace/js/ace/ace.js"></script>
	<!-- 日期框 -->
	<script src="static/ace/js/date-time/bootstrap-datepicker.js"></script>
	<!-- 下拉框 -->
	<script src="static/ace/js/chosen.jquery.js"></script>
	<script src="https://cdn.bootcss.com/Chart.js/2.7.2/Chart.bundle.min.js"></script>
	<!--提示框-->
	<script type="text/javascript" src="static/js/jquery.tips.js"></script>
	<script type="text/javascript" src="https://chartjs.bootcss.com/samples/utils.js"></script>
</body>
<script type="text/javascript">
$(top.hangge());
$(function(){
	$('.date-picker').datepicker({autoclose: true,todayHighlight: true});
	 var times=${pd.times}
	 $('.pareny a').eq(times-1).addClass('active')
})
function times(ids){
	$("#times").val(ids);
	$("#userForm").submit();
}
function searchs(){
	$("#userForm").submit();
}
function member(){
	startTime=$("#startTime").val();
    endTime=$("#endTime").val();
	window.location.href='/goldBowl/profitActivity.do?sort=01&kd=1&startTime='+startTime+'&endTime='+endTime;
}
function member1(){
	startTime=$("#startTime").val();
    endTime=$("#endTime").val();
	window.location.href='/goldBowl/profitActivity.do?sort=01&buyState=00&kd=1&startTime='+startTime+'&endTime='+endTime;
}
</script>
</html>
